from django.contrib import admin
from pagemagic.admin import PageAdmin, ExtensionAdmin
from pagemagic.models import Page
from models import MenuItemAttrs, PageAttrs

class MenuItemAttrsInlineAdmin(ExtensionAdmin):
    model = MenuItemAttrs

class PageAttrsInlineAdmin(ExtensionAdmin):
    model = PageAttrs

class ExtendedPageAdmin(PageAdmin):
    inlines = [
        MenuItemAttrsInlineAdmin,
        PageAttrsInlineAdmin,
    ]

admin.site.unregister(Page)
admin.site.register(Page, ExtendedPageAdmin)
